package chai.ningning.tcp;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketAddress;

public class FirstClient {

    public static void main(String[] args) throws IOException {

        final String remotedHost = "1.0.0.96";
        final int remotedPort = 55555;

        //创建客户端
        Socket client = new Socket();

        //为 ServerSocket 绑定 IP地址 和端口
        SocketAddress remote = new InetSocketAddress(remotedHost,remotedPort);

        //侦听来自服务端的连接
        client.connect(remote);

        //关闭侦听
        client.close();
    }
}
